
define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";
	require("constants_shop.js");
	var wind_async=require('ddf_wind_async');
	var history=require('component-history');
	
//加载左边菜单
loadMenu("shop"); 
	
/**
 * 
 * @param type
 */
exports.init=function(m) {
	history.addHis(this,arguments);//增加历史
	window.$ddf_index = m;
	
/*	var htmlStr = "";
	
	htmlStr += '<div id="content-header">';
	htmlStr += '<div id="breadcrumb"> <a href=javascript:load("'+ddf.index.index_js+'") title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 欢迎进入云便利商店商家系统！</div>';
	htmlStr += '</div>';
	htmlStr += '<div class="container-fluid">';
	htmlStr += '<div class="quick-actions_homepage">';
	htmlStr += '<ul class="quick-actions">';

	htmlStr += '<li id="SHOP_ORDER_MANAGER" class="bg_lb" style="display:none;"> <a href=javascript:load("'+ddf.order.order_js+'")> <i class="icon-edit"></i> <span class="label label-important"></span> 订单查询 </a> </li>';
	htmlStr += '<li id="SHOP_GOODS_MANAGER" class="bg_lg span3" style="display:none;"> <a href=javascript:load("'+ddf.merchandise.merchandise_js+'")> <i class="icon-inbox"></i>商品管理</a> </li>';
	htmlStr += '<li id="SHOP_TERNIMAL_MONITOR_MANAGER" class="bg_ly" style="display:none;"> <a href=javascript:load("'+ddf.terminal.terminal_js+'")> <i class="icon-paste"></i><span class="label label-success"></span>设备监控</a> </li>';
	htmlStr += '<li id="SHOP_MC_MEMBER_SEARCH_MANAGER" class="bg_lo" style="display:none;"> <a href=javascript:load("'+ddf.member.member_js+'")> <i class="icon-user"></i>会员查询</a> </li>';
	htmlStr += '<li id="SHOP_MY_SECURITY_MANAGER" class="bg_ls" style="display:none;"> <a href=javascript:load("'+ddf.safeSet.safeSet_js+'")> <i class="icon-info-sign"></i>安全设置</a> </li>';

	htmlStr += '<li id="SHOP_MY_ACCOUNT_JOURNAL_MANAGER" class="bg_lo span3" style="display:none;"> <a href=javascript:load("'+ddf.account.account_js+'")> <i class="icon-tint"></i>账户流水</a> </li>';
	htmlStr += '<li id="SHOP_MY_BANK_MANAGER" class="bg_ls" style="display:none;"> <a href=javascript:load("'+ddf.bank.bank_js+'")> <i class="icon-credit-card"></i>银行账户</a> </li>';
	htmlStr += '<li id="SHOP_MY_ACCOUNT_SETTLE_MANAGER" class="bg_lb" style="display:none;"> <a href=javascript:load("'+ddf.withdraw.withdraw_js+'")> <i class="icon-money"></i>提现</a> </li>';
	htmlStr += '<li id="SHOP_TERMINAL_LOG_MANAGER" class="bg_lg" style="display:none;"> <a href=javascript:load("'+ddf.log.terminalLog_js+'")> <i class="icon-calendar"></i> 日志记录</a> </li>';
	htmlStr += '<li id="SHOP_REPORT_PROFIT_MANAGER" class="bg_lr" style="display:none;"> <a href="#"> <i class="icon-bar-chart"></i> 营业报表</a> </li>';
	htmlStr += '</ul>';
	htmlStr += '</div>';
//	<div id="chart2" class="example-chart" style="height:300px;width:500px"></div>
	htmlStr += '<hr/>';
	htmlStr += '</div>';
	$("#content").html(htmlStr);

	showOperate();*/
	
	$("#content").html('<div class="row-fluid"><div class="logon span4" style="margin:20px auto 0; float:none;"><h4><span>'+$("#session_shopname").val()+'</span> , 您好!</h4><p>欢迎进入云便利商店商家管理员后台</p></div></div>');
	    
  }
   function showOperate(){
//	   DDF_AsyncRequest("POST",ddf.index.queryShowOperateShop,"",'$ddf_index.showOperateCallBack(data)');
   
	   eval(Wind.compile("async",function(){
			
			var data = $await(wind_async.DDF_AsyncRequest("POST",ddf.index.queryShowOperateShop,""));
			
			showOperateCallBack(data);
			
		}))().start();
   
   
   
   }
   function showOperateCallBack(data){
	   if(data["SHOP_ORDER_MANAGER"])
			$("#SHOP_ORDER_MANAGER").css("display","block");
		if(data["SHOP_GOODS_MANAGER"])
			$("#SHOP_GOODS_MANAGER").css("display","block");
		if(data["SHOP_TERNIMAL_MONITOR_MANAGER"])
			$("#SHOP_TERNIMAL_MONITOR_MANAGER").css("display","block");
		if(data["SHOP_MC_MEMBER_SEARCH_MANAGER"])
			$("#SHOP_MC_MEMBER_SEARCH_MANAGER").css("display","block");
		if(data["SHOP_MY_SECURITY_MANAGER"])
			$("#SHOP_MY_SECURITY_MANAGER").css("display","block");
		if(data["SHOP_MY_ACCOUNT_JOURNAL_MANAGER"])
			$("#SHOP_MY_ACCOUNT_JOURNAL_MANAGER").css("display","block");
		if(data["SHOP_MY_BANK_MANAGER"])
			$("#SHOP_MY_BANK_MANAGER").css("display","block");
		if(data["SHOP_MY_ACCOUNT_SETTLE_MANAGER"])
			$("#SHOP_MY_ACCOUNT_SETTLE_MANAGER").css("display","block");
		if(data["SHOP_TERMINAL_LOG_MANAGER"])
			$("#SHOP_TERMINAL_LOG_MANAGER").css("display","block");
		if(data["SHOP_REPORT_PROFIT_MANAGER"])
			$("#SHOP_REPORT_PROFIT_MANAGER").css("display","block");
  }
//暴露方法

});
